Skip to content

Conversation

@juruen
Copy link
Collaborator

@juruen juruen commented Apr 7, 2025

Context

This PR adds a script to pretty print the output of the github-mcp-server log. This is useful for developers working on tools that want to see the full interaction between host and server.

This was already possible by running the server with:

--enable-command-logging --log-file server.log

However, with the introduction script/prettyprint-log, you can do:

tail -f server.log |  script/prettyprint-log

and get a nice, pretty-printed output of all the server<->host interactions:

Screenshot 2025-04-07 at 11 24 59

This new script can take a file as an argument, or read from stdin by default if none is passed. It also detect whether it's outputting to an actual terminal to enable/disable the use of colors.

As an aside note, if we end up changing the log's output format, or we want to drop the use of colors, the script can be even more simple.

Closes: #145

Copilot AI review requested due to automatic review settings April 7, 2025 09:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.

Files not reviewed (1)
  • script/prettyprint-log: Language not supported

Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused. Learn more

@toby toby self-assigned this Apr 7, 2025
@juruen juruen merged commit 8a9f0b0 into main Apr 7, 2025
16 checks passed
@juruen juruen deleted the juruen/pretty-print-log branch April 7, 2025 15:32
manian0430 pushed a commit to ChrisLally/github-mcp-server that referenced this pull request Apr 12, 2025
DaleSeo pushed a commit to DaleSeo/github-mcp-server that referenced this pull request Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

add ability to pretty print log

3 participants